package sz.szsmk.citizencard.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import sz.szsmk.citizencard.model.network.dzbean.res.SysConf;
import sz.szsmk.citizencard.model.network.dzbean.res.MyQrCodeNumber;
import sz.szsmk.citizencard.db.StationChangeDb;
import sz.szsmk.citizencard.db.BusSiteDb;
import sz.szsmk.citizencard.db.SearchHistory;
import sz.szsmk.citizencard.db.PublicDb;
import sz.szsmk.citizencard.db.Note;
import sz.szsmk.citizencard.db.StationSearchDb;
import sz.szsmk.citizencard.db.BalanceDao;

import sz.szsmk.citizencard.db.SysConfDao;
import sz.szsmk.citizencard.db.MyQrCodeNumberDao;
import sz.szsmk.citizencard.db.StationChangeDbDao;
import sz.szsmk.citizencard.db.BusSiteDbDao;
import sz.szsmk.citizencard.db.SearchHistoryDao;
import sz.szsmk.citizencard.db.PublicDbDao;
import sz.szsmk.citizencard.db.NoteDao;
import sz.szsmk.citizencard.db.StationSearchDbDao;
import sz.szsmk.citizencard.db.BalanceDaoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig sysConfDaoConfig;
    private final DaoConfig myQrCodeNumberDaoConfig;
    private final DaoConfig stationChangeDbDaoConfig;
    private final DaoConfig busSiteDbDaoConfig;
    private final DaoConfig searchHistoryDaoConfig;
    private final DaoConfig publicDbDaoConfig;
    private final DaoConfig noteDaoConfig;
    private final DaoConfig stationSearchDbDaoConfig;
    private final DaoConfig balanceDaoDaoConfig;

    private final SysConfDao sysConfDao;
    private final MyQrCodeNumberDao myQrCodeNumberDao;
    private final StationChangeDbDao stationChangeDbDao;
    private final BusSiteDbDao busSiteDbDao;
    private final SearchHistoryDao searchHistoryDao;
    private final PublicDbDao publicDbDao;
    private final NoteDao noteDao;
    private final StationSearchDbDao stationSearchDbDao;
    private final BalanceDaoDao balanceDaoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        sysConfDaoConfig = daoConfigMap.get(SysConfDao.class).clone();
        sysConfDaoConfig.initIdentityScope(type);

        myQrCodeNumberDaoConfig = daoConfigMap.get(MyQrCodeNumberDao.class).clone();
        myQrCodeNumberDaoConfig.initIdentityScope(type);

        stationChangeDbDaoConfig = daoConfigMap.get(StationChangeDbDao.class).clone();
        stationChangeDbDaoConfig.initIdentityScope(type);

        busSiteDbDaoConfig = daoConfigMap.get(BusSiteDbDao.class).clone();
        busSiteDbDaoConfig.initIdentityScope(type);

        searchHistoryDaoConfig = daoConfigMap.get(SearchHistoryDao.class).clone();
        searchHistoryDaoConfig.initIdentityScope(type);

        publicDbDaoConfig = daoConfigMap.get(PublicDbDao.class).clone();
        publicDbDaoConfig.initIdentityScope(type);

        noteDaoConfig = daoConfigMap.get(NoteDao.class).clone();
        noteDaoConfig.initIdentityScope(type);

        stationSearchDbDaoConfig = daoConfigMap.get(StationSearchDbDao.class).clone();
        stationSearchDbDaoConfig.initIdentityScope(type);

        balanceDaoDaoConfig = daoConfigMap.get(BalanceDaoDao.class).clone();
        balanceDaoDaoConfig.initIdentityScope(type);

        sysConfDao = new SysConfDao(sysConfDaoConfig, this);
        myQrCodeNumberDao = new MyQrCodeNumberDao(myQrCodeNumberDaoConfig, this);
        stationChangeDbDao = new StationChangeDbDao(stationChangeDbDaoConfig, this);
        busSiteDbDao = new BusSiteDbDao(busSiteDbDaoConfig, this);
        searchHistoryDao = new SearchHistoryDao(searchHistoryDaoConfig, this);
        publicDbDao = new PublicDbDao(publicDbDaoConfig, this);
        noteDao = new NoteDao(noteDaoConfig, this);
        stationSearchDbDao = new StationSearchDbDao(stationSearchDbDaoConfig, this);
        balanceDaoDao = new BalanceDaoDao(balanceDaoDaoConfig, this);

        registerDao(SysConf.class, sysConfDao);
        registerDao(MyQrCodeNumber.class, myQrCodeNumberDao);
        registerDao(StationChangeDb.class, stationChangeDbDao);
        registerDao(BusSiteDb.class, busSiteDbDao);
        registerDao(SearchHistory.class, searchHistoryDao);
        registerDao(PublicDb.class, publicDbDao);
        registerDao(Note.class, noteDao);
        registerDao(StationSearchDb.class, stationSearchDbDao);
        registerDao(BalanceDao.class, balanceDaoDao);
    }
    
    public void clear() {
        sysConfDaoConfig.clearIdentityScope();
        myQrCodeNumberDaoConfig.clearIdentityScope();
        stationChangeDbDaoConfig.clearIdentityScope();
        busSiteDbDaoConfig.clearIdentityScope();
        searchHistoryDaoConfig.clearIdentityScope();
        publicDbDaoConfig.clearIdentityScope();
        noteDaoConfig.clearIdentityScope();
        stationSearchDbDaoConfig.clearIdentityScope();
        balanceDaoDaoConfig.clearIdentityScope();
    }

    public SysConfDao getSysConfDao() {
        return sysConfDao;
    }

    public MyQrCodeNumberDao getMyQrCodeNumberDao() {
        return myQrCodeNumberDao;
    }

    public StationChangeDbDao getStationChangeDbDao() {
        return stationChangeDbDao;
    }

    public BusSiteDbDao getBusSiteDbDao() {
        return busSiteDbDao;
    }

    public SearchHistoryDao getSearchHistoryDao() {
        return searchHistoryDao;
    }

    public PublicDbDao getPublicDbDao() {
        return publicDbDao;
    }

    public NoteDao getNoteDao() {
        return noteDao;
    }

    public StationSearchDbDao getStationSearchDbDao() {
        return stationSearchDbDao;
    }

    public BalanceDaoDao getBalanceDaoDao() {
        return balanceDaoDao;
    }

}
